<?php
/**
 * Created by PhpStorm.
 * User: mars
 * Date: 2019/2/23
 * Time: 2:44 PM
 */

namespace api\models;


use common\libs\Constants;

class SearchPart extends \backend\models\SearchPart
{
    public function fields()
    {
        return [
            'id',
            'name',
            'value',
            'type' => function ($model) {
                return Constants::getSearchPartTypes($model->type);
            },
        ];
    }


}